package com.three.sb_group3.service.impl;

import com.three.sb_group3.entity.MoviesLikes;
import com.three.sb_group3.mapper.MoviesLikesMapper;
import com.three.sb_group3.service.MoviesLikesService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
@Service
public class MoviesLikesServiceimpl implements MoviesLikesService {
    @Resource
    @Autowired
    private MoviesLikesMapper moviesLikesMapper;

    @Override
    public List<MoviesLikes> moviesLikes() {
        MoviesLikes moviesLikes = new MoviesLikes();
        moviesLikes.setId(1L);
        moviesLikes.setLikes_count(2);
        int insert = moviesLikesMapper.updateById(moviesLikes);
        System.out.println(insert);
        return null;
    }

    @Override
    public List<MoviesLikes> moviesComments() {
        MoviesLikes moviesLikes = new MoviesLikes();
        moviesLikes.setId(2L);
        moviesLikes.setComment_section("its nice movie");
        int insert = moviesLikesMapper.updateById(moviesLikes);
        System.out.println(insert);
        return null;
    }
}
